package com.weiyuwqj.api.util.converter;

import org.springframework.core.convert.converter.Converter;

public class DoubleConverter implements Converter<String,Double> {
 
    @Override
    public Double convert(String text) {
        if (text==null||text.isEmpty()) return 0d;
        try {
            return Double.parseDouble(text);
        } catch (Exception e) {
        }
        return 0d;
    }
 
}